package expert

import (
	"gpt-api/framework/cache"
	"gpt-api/framework/db"
	"gpt-api/pkg/pay"
)

type Handler struct {
	db     *db.DB
	cache  *cache.RedisClient
	payers map[pay.Channel]pay.Payer
}

func New(db *db.DB, cache *cache.RedisClient) *Handler {
	payers := make(map[pay.Channel]pay.Payer)
	payers[pay.AppleChannel] = pay.NewApple()
	//payers[pay.AlipayChannel] = pay.NewAlipay()
	//payers[pay.WechatChannel] = pay.NewWechat()
	//payers[pay.SandeChannel] = pay.NewSandePay()
	return &Handler{db: db, cache: cache, payers: payers}
}
